﻿<%@ Page Language="C#" MasterPageFile="~/Admin/admin.master" AutoEventWireup="true"  CodeFile="JournalVoucherTypeEdit.aspx.cs" Inherits="JournalVoucherTypeEdit" Title="JournalVoucherType Edit" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">Journal Voucher Type - Add/Edit</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
		<data:MultiFormView ID="FormView1" DataKeyNames="JournalVoucherTypeId" runat="server" DataSourceID="JournalVoucherTypeDataSource">
		
			<EditItemTemplatePaths>
				<data:TemplatePath Path="~/Admin/UserControls/JournalVoucherTypeFields.ascx" />
			</EditItemTemplatePaths>
		
			<InsertItemTemplatePaths>
				<data:TemplatePath Path="~/Admin/UserControls/JournalVoucherTypeFields.ascx" />
			</InsertItemTemplatePaths>
		
			<EmptyDataTemplate>
				<b>JournalVoucherType not found!</b>
			</EmptyDataTemplate>
			
			<FooterTemplate>
				<asp:Button ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert" Text="Insert" />
				<asp:Button ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update" Text="Update" />
				<asp:Button ID="CancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" />
			</FooterTemplate>

		</data:MultiFormView>
		
		<data:JournalVoucherTypeDataSource ID="JournalVoucherTypeDataSource" runat="server"
			SelectMethod="GetByJournalVoucherTypeId"
		>
			<Parameters>
				<asp:QueryStringParameter Name="JournalVoucherTypeId" QueryStringField="JournalVoucherTypeId" Type="String" />

			</Parameters>
		</data:JournalVoucherTypeDataSource>
		
		<br />

		<data:EntityGridView ID="GridViewJournalVoucher1" runat="server"
			AutoGenerateColumns="False"	
			OnSelectedIndexChanged="GridViewJournalVoucher1_SelectedIndexChanged"			 			 
			DataSourceID="JournalVoucherDataSource1"
			DataKeyNames="JournalVoucherId"
			AllowMultiColumnSorting="false"
			DefaultSortColumnName="" 
			DefaultSortDirection="Ascending"	
			ExcelExportFileName="Export_JournalVoucher.xls"  		
			Visible='<%# (FormView1.DefaultMode == FormViewMode.Insert) ? false : true %>'	
			>
			<Columns>
				<asp:CommandField ShowSelectButton="True" />
				<asp:BoundField DataField="JournalVoucherDate" HeaderText="Journal Voucher Date" SortExpression="[JournalVoucherDate]" />				
				<data:HyperLinkField HeaderText="Journal Voucher Type Id" DataNavigateUrlFormatString="JournalVoucherTypeEdit.aspx?JournalVoucherTypeId={0}" DataNavigateUrlFields="JournalVoucherTypeId" DataContainer="JournalVoucherTypeIdSource" DataTextField="Description" />
				<asp:BoundField DataField="Address" HeaderText="Address" SortExpression="[Address]" />				
				<asp:BoundField DataField="Description" HeaderText="Description" SortExpression="[Description]" />				
				<asp:BoundField DataField="ExchangeRate" HeaderText="Exchange Rate" SortExpression="[ExchangeRate]" />				
				<asp:BoundField DataField="PreparedBy" HeaderText="Prepared By" SortExpression="[PreparedBy]" />				
				<asp:BoundField DataField="NotifyCode" HeaderText="Notify Code" SortExpression="[NotifyCode]" />				
				<asp:BoundField DataField="IsSentForApproval" HeaderText="Is Sent For Approval" SortExpression="[IsSentForApproval]" />				
				<asp:BoundField DataField="IsApproved" HeaderText="Is Approved" SortExpression="[IsApproved]" />				
				<asp:BoundField DataField="ApprovalBy" HeaderText="Approval By" SortExpression="[ApprovalBy]" />				
				<asp:BoundField DataField="ApprovedDate" HeaderText="Approved Date" SortExpression="[ApprovedDate]" />				
				<asp:BoundField DataField="Reason" HeaderText="Reason" SortExpression="[Reason]" />				
				<asp:BoundField DataField="IsCompleted" HeaderText="Is Completed" SortExpression="[IsCompleted]" />				
				<asp:BoundField DataField="ExportedBy" HeaderText="Exported By" SortExpression="[ExportedBy]" />				
				<asp:BoundField DataField="ExportedDate" HeaderText="Exported Date" SortExpression="[ExportedDate]" />				
				<asp:BoundField DataField="IsDebit" HeaderText="Is Debit" SortExpression="[IsDebit]" />				
				<asp:BoundField DataField="IsVoid" HeaderText="Is Void" SortExpression="[IsVoid]" />				
				<asp:BoundField DataField="VoidReason" HeaderText="Void Reason" SortExpression="[VoidReason]" />				
				<asp:BoundField DataField="VoidBy" HeaderText="Void By" SortExpression="[VoidBy]" />				
				<asp:BoundField DataField="VoidDate" HeaderText="Void Date" SortExpression="[VoidDate]" />				
				<asp:BoundField DataField="CreatedDate" HeaderText="Created Date" SortExpression="[CreatedDate]" />				
			</Columns>
			<EmptyDataTemplate>
				<b>No Journal Voucher Found! </b>
				<asp:HyperLink runat="server" ID="hypJournalVoucher" NavigateUrl="~/admin/JournalVoucherEdit.aspx">Add New</asp:HyperLink>
			</EmptyDataTemplate>
		</data:EntityGridView>					
		
		<data:JournalVoucherDataSource ID="JournalVoucherDataSource1" runat="server" SelectMethod="Find"
			EnableDeepLoad="True"
			>
			<DeepLoadProperties Method="IncludeChildren" Recursive="False">
	            <Types>
					<data:JournalVoucherProperty Name="JournalVoucherType"/> 
					<%--<data:JournalVoucherProperty Name="JournalDetailsCollection" />--%>
				</Types>
			</DeepLoadProperties>
			
		    <Parameters>
				<data:SqlParameter Name="Parameters">
					<Filters>
						<data:JournalVoucherFilter  Column="JournalVoucherTypeId" QueryStringField="JournalVoucherTypeId" /> 
					</Filters>
				</data:SqlParameter>
				<data:CustomParameter Name="OrderByClause" Value="" ConvertEmptyStringToNull="false" /> 
		    </Parameters>
		</data:JournalVoucherDataSource>		
		
		<br />
		

</asp:Content>

